package com.homeparking.manage.service.impl;

import java.util.List;
import com.homeparking.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.homeparking.manage.mapper.ManageDeveloperMapper;
import com.homeparking.manage.domain.ManageDeveloper;
import com.homeparking.manage.service.IManageDeveloperService;

/**
 * 开发商Service业务层处理
 * 
 * @author liuyangyang
 * @date 2025-10-12
 */
@Service
public class ManageDeveloperServiceImpl implements IManageDeveloperService 
{
    @Autowired
    private ManageDeveloperMapper manageDeveloperMapper;

    /**
     * 查询开发商
     * 
     * @param developerId 开发商主键
     * @return 开发商
     */
    @Override
    public ManageDeveloper selectManageDeveloperByDeveloperId(String developerId)
    {
        return manageDeveloperMapper.selectManageDeveloperByDeveloperId(developerId);
    }

    /**
     * 查询开发商列表
     * 
     * @param manageDeveloper 开发商
     * @return 开发商
     */
    @Override
    public List<ManageDeveloper> selectManageDeveloperList(ManageDeveloper manageDeveloper)
    {
        return manageDeveloperMapper.selectManageDeveloperList(manageDeveloper);
    }

    /**
     * 新增开发商
     * 
     * @param manageDeveloper 开发商
     * @return 结果
     */
    @Override
    public int insertManageDeveloper(ManageDeveloper manageDeveloper)
    {
        manageDeveloper.setCreateTime(DateUtils.getNowDate());
        return manageDeveloperMapper.insertManageDeveloper(manageDeveloper);
    }

    /**
     * 修改开发商
     * 
     * @param manageDeveloper 开发商
     * @return 结果
     */
    @Override
    public int updateManageDeveloper(ManageDeveloper manageDeveloper)
    {
        manageDeveloper.setUpdateTime(DateUtils.getNowDate());
        return manageDeveloperMapper.updateManageDeveloper(manageDeveloper);
    }

    /**
     * 批量删除开发商
     * 
     * @param developerIds 需要删除的开发商主键
     * @return 结果
     */
    @Override
    public int deleteManageDeveloperByDeveloperIds(String[] developerIds)
    {
        return manageDeveloperMapper.deleteManageDeveloperByDeveloperIds(developerIds);
    }

    /**
     * 删除开发商信息
     * 
     * @param developerId 开发商主键
     * @return 结果
     */
    @Override
    public int deleteManageDeveloperByDeveloperId(String developerId)
    {
        return manageDeveloperMapper.deleteManageDeveloperByDeveloperId(developerId);
    }
}
